******************************************************************
*                                                                *
* How Autocratization Shapes Environmental Policies and Outcomes *
*                                                                *
* Thomas Bernauer and Tobias Böhmelt                             *
*                                                                *
* This Version: April 1, 2025                                    *
*                                                                *
* tbohmelt@essex.ac.uk                                           *
*                                                                *
******************************************************************

********************
* Data Preparation *
********************

use "qog_2024.dta" , clear

xtset ccode year

gen ghg_pc_ln=ln(en_ghg_all_mt_ce_ar5/wdi_pop)
gen LDV=l.ghg_pc_ln

gen climate_policies=ln(1+policies_all)
gen LDV2=l.climate_policies

gen autocratization=l.auto_period01ci

gen gdp_pc_ln=ln(wdi_gdpcappppcon2017)
gen gdp_pc_ln_lag=l.gdp_pc_ln
gen gdp_pc_ln_lag2=gdp_pc_ln_lag*gdp_pc_ln_lag

gen pop_ln=ln(wdi_pop)
gen pop_ln_lag=l.pop_ln

gen democracy_lag=l.vdem_polyarchy

gen globalization=l.dr_ig

sum ghg_pc_ln LDV climate_policies LDV2 autocratization gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization if year>1989

*************************
* Climate Policy Models *
*************************

preserve
keep if year>1989
fect climate_policies, treat(autocratization) unit(ccode) time(year) cov(LDV2 gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("fe") force("two-way") se nboots(1000) preperiod(-15) offperiod(5)
mat list e(ATT)
mat list e(ATTs)
mat list e(coefs)
fect climate_policies, treat(autocratization) unit(ccode) time(year) cov(LDV2 gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("ife") force("two-way") r(1) se nboots(1000) preperiod(-15) offperiod(5)
mat list e(ATT)
mat list e(ATTs)
mat list e(coefs)
fect climate_policies, treat(autocratization) unit(ccode) time(year) cov(LDV2 gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("mc") force("two-way") lambda(0.004) se nboots(1000) preperiod(-15) offperiod(5)
mat list e(ATT)
mat list e(ATTs)
mat list e(coefs)
restore
 
************************
* GHG Emissions Models *
************************

preserve
keep if year>1989
fect ghg_pc_ln, treat(autocratization) unit(ccode) time(year) cov(LDV gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("fe") force("two-way") se nboots(1000) preperiod(-15) offperiod(5)
mat list e(ATT)
mat list e(ATTs)
mat list e(coefs)
fect ghg_pc_ln, treat(autocratization) unit(ccode) time(year) cov(LDV gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("ife") force("two-way") r(1) se nboots(1000) preperiod(-15) offperiod(5)
mat list e(ATT)
mat list e(ATTs)
mat list e(coefs)
fect ghg_pc_ln, treat(autocratization) unit(ccode) time(year) cov(LDV gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("mc") force("two-way") lambda(0.004) se nboots(1000) preperiod(-15) offperiod(5)
mat list e(ATT)
mat list e(ATTs)
mat list e(coefs)
restore
 
****************************************
* Supporting Information: Placebo Test *
****************************************

preserve
keep if year>1989
fect climate_policies, treat(autocratization) unit(ccode) time(year) cov(LDV2 gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("fe") force("two-way") se nboots(1000) placeboTest 
fect climate_policies, treat(autocratization) unit(ccode) time(year) cov(LDV2 gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("ife") force("two-way") r(1) se nboots(1000) placeboTest 
fect climate_policies, treat(autocratization) unit(ccode) time(year) cov(LDV2 gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("mc") force("two-way") lambda(0.004) se nboots(1000) placeboTest 
restore

preserve
keep if year>1989
fect ghg_pc_ln, treat(autocratization) unit(ccode) time(year) cov(LDV gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("fe") force("two-way") se nboots(1000) placeboTest
fect ghg_pc_ln, treat(autocratization) unit(ccode) time(year) cov(LDV gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("ife") force("two-way") r(1) se nboots(1000) placeboTest
fect ghg_pc_ln, treat(autocratization) unit(ccode) time(year) cov(LDV gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("mc") force("two-way") lambda(0.004) se nboots(1000) placeboTest
restore

********************************************
* Supporting Information: Equivalence Test *
********************************************

preserve
keep if year>1989
fect climate_policies, treat(autocratization) unit(ccode) time(year) cov(LDV2 gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("fe") force("two-way") se nboots(1000) equiTest 
fect climate_policies, treat(autocratization) unit(ccode) time(year) cov(LDV2 gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("ife") force("two-way") r(1) se nboots(1000) equiTest 
fect climate_policies, treat(autocratization) unit(ccode) time(year) cov(LDV2 gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("mc") force("two-way") lambda(0.004) se nboots(1000) equiTest 
restore

preserve
keep if year>1989
fect ghg_pc_ln, treat(autocratization) unit(ccode) time(year) cov(LDV gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("fe") force("two-way") se nboots(1000) equiTest 
fect ghg_pc_ln, treat(autocratization) unit(ccode) time(year) cov(LDV gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("ife") force("two-way") r(1) se nboots(1000) equiTest 
fect ghg_pc_ln, treat(autocratization) unit(ccode) time(year) cov(LDV gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("mc") force("two-way") lambda(0.004) se nboots(1000) equiTest 
restore

******************************************
* Supporting Information: Carryover Test *
******************************************

preserve
keep if year>1989
fect climate_policies, treat(autocratization) unit(ccode) time(year) cov(LDV2 gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("fe") force("two-way") se nboots(1000) carryoverTest 
fect climate_policies, treat(autocratization) unit(ccode) time(year) cov(LDV2 gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("ife") force("two-way") r(1) se nboots(1000) carryoverTest  
fect climate_policies, treat(autocratization) unit(ccode) time(year) cov(LDV2 gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("mc") force("two-way") lambda(0.004) se nboots(1000) carryoverTest  
restore

preserve
keep if year>1989
fect ghg_pc_ln, treat(autocratization) unit(ccode) time(year) cov(LDV gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("fe") force("two-way") se nboots(1000) carryoverTest 
fect ghg_pc_ln, treat(autocratization) unit(ccode) time(year) cov(LDV gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("ife") force("two-way") r(1) se nboots(1000) carryoverTest 
fect ghg_pc_ln, treat(autocratization) unit(ccode) time(year) cov(LDV gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("mc") force("two-way") lambda(0.004) se nboots(1000) carryoverTest 
restore

*********************************************************
* Supporting Information: Alternative Policy Indicators *
*********************************************************

preserve
gen LDV3=l.policy_air_pollution
gen LDV4=l.policy_climate
gen binary_policies=policies_all
replace binary_policies=1 if binary_policies>0 & binary_policies!=.
gen LDV5=l.binary_policies
gen LDV6=l.high_impact_policy
keep if year>1989
fect policy_air_pollution, treat(autocratization) unit(ccode) time(year) cov(LDV3 gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("fe") force("two-way") se nboots(1000) preperiod(-15) offperiod(5)
mat list e(ATT)
mat list e(ATTs)
mat list e(coefs)
fect policy_climate, treat(autocratization) unit(ccode) time(year) cov(LDV4 gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("fe") force("two-way") se nboots(1000) preperiod(-15) offperiod(5)
mat list e(ATT)
mat list e(ATTs)
mat list e(coefs)
fect binary_policies, treat(autocratization) unit(ccode) time(year) cov(LDV5 gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("fe") force("two-way") se nboots(1000) preperiod(-15) offperiod(5)
mat list e(ATT)
mat list e(ATTs)
mat list e(coefs)
fect high_impact_policy, treat(autocratization) unit(ccode) time(year) cov(LDV6 gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("fe") force("two-way") se nboots(1000) preperiod(-15) offperiod(5)
mat list e(ATT)
mat list e(ATTs)
mat list e(coefs)
restore

*********************************************************
* Supporting Information: Alternative Outcome Indicators *
*********************************************************

preserve
gen LDV7=l.ef_ef
gen ln_co2=ln(1+wdi_co2)
gen LDV8=l.ln_co2
keep if year>1989
fect ef_ef, treat(autocratization) unit(ccode) time(year) cov(LDV7 gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("fe") force("two-way") se nboots(1000) preperiod(-15) offperiod(5)
mat list e(ATT)
mat list e(ATTs)
mat list e(coefs)
fect ln_co2, treat(autocratization) unit(ccode) time(year) cov(LDV8 gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("fe") force("two-way") se nboots(1000) preperiod(-15) offperiod(5)
mat list e(ATT)
mat list e(ATTs)
mat list e(coefs)
restore

******************************************************************
* Supporting Information: Alternative Autocratization Indicators *
******************************************************************

preserve
replace autocratization=l.auto_period01ci_start005
keep if year>1989
fect climate_policies, treat(autocratization) unit(ccode) time(year) cov(LDV2 gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("fe") force("two-way") se nboots(1000) preperiod(-15) offperiod(5)
mat list e(ATT)
mat list e(ATTs)
mat list e(coefs)
fect ghg_pc_ln, treat(autocratization) unit(ccode) time(year) cov(LDV gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("fe") force("two-way") se nboots(1000) preperiod(-15) offperiod(5)
mat list e(ATT)
mat list e(ATTs)
mat list e(coefs)
restore

preserve
replace autocratization=l.auto_period01_libdem_ci
keep if year>1989
fect climate_policies, treat(autocratization) unit(ccode) time(year) cov(LDV2 gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("fe") force("two-way") se nboots(1000) preperiod(-15) offperiod(5)
mat list e(ATT)
mat list e(ATTs)
mat list e(coefs)
fect ghg_pc_ln, treat(autocratization) unit(ccode) time(year) cov(LDV gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("fe") force("two-way") se nboots(1000) preperiod(-15) offperiod(5)
mat list e(ATT)
mat list e(ATTs)
mat list e(coefs)
restore

preserve
replace autocratization=l.auto_period01_libdem_ci_strt005
keep if year>1989
fect climate_policies, treat(autocratization) unit(ccode) time(year) cov(LDV2 gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("fe") force("two-way") se nboots(1000) preperiod(-15) offperiod(5)
mat list e(ATT)
mat list e(ATTs)
mat list e(coefs)
fect ghg_pc_ln, treat(autocratization) unit(ccode) time(year) cov(LDV gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("fe") force("two-way") se nboots(1000) preperiod(-15) offperiod(5)
mat list e(ATT)
mat list e(ATTs)
mat list e(coefs)
restore

preserve
replace autocratization=l.auto_period02ci
keep if year>1989
fect climate_policies, treat(autocratization) unit(ccode) time(year) cov(LDV2 gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("fe") force("two-way") se nboots(1000) preperiod(-15) offperiod(5)
mat list e(ATT)
mat list e(ATTs)
mat list e(coefs)
fect ghg_pc_ln, treat(autocratization) unit(ccode) time(year) cov(LDV gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("fe") force("two-way") se nboots(1000) preperiod(-15) offperiod(5)
mat list e(ATT)
mat list e(ATTs)
mat list e(coefs)
restore

preserve
replace autocratization=l.auto_period02ci_start005
keep if year>1989
fect climate_policies, treat(autocratization) unit(ccode) time(year) cov(LDV2 gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("fe") force("two-way") se nboots(1000) preperiod(-15) offperiod(5)
mat list e(ATT)
mat list e(ATTs)
mat list e(coefs)
fect ghg_pc_ln, treat(autocratization) unit(ccode) time(year) cov(LDV gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("fe") force("two-way") se nboots(1000) preperiod(-15) offperiod(5)
mat list e(ATT)
mat list e(ATTs)
mat list e(coefs)
restore

preserve
keep if year>1989
keep if right_wing_executive==1
fect climate_policies, treat(autocratization) unit(ccode) time(year) cov(LDV2 gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("fe") force("two-way") se nboots(1000) preperiod(-15) offperiod(5)
mat list e(ATT)
mat list e(ATTs)
mat list e(coefs)
fect ghg_pc_ln, treat(autocratization) unit(ccode) time(year) cov(LDV gdp_pc_ln_lag gdp_pc_ln_lag2 pop_ln_lag democracy_lag globalization) method("fe") force("two-way") se nboots(1000) preperiod(-15) offperiod(5)
mat list e(ATT)
mat list e(ATTs)
mat list e(coefs)
restore